CREATE PROCEDURE coreAdminGroupsSave
(
	@id int output,
	@groupname nvarchar(200)
	
)
AS

IF @id = -1
BEGIN
	SET NOCOUNT ON;
	INSERT INTO AdministrationGroups (GroupName) VALUES (@groupname);
	SET NOCOUNT OFF;
	SELECT @id = @@IDENTITY;
END
ELSE
	UPDATE AdministrationGroups SET GroupName=@groupname WHERE PK_ID=@id;